﻿<UserControl xmlns:UIElements="clr-namespace:SymulatorEthernetWPF.UserInterface.UIElements"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Shared="clr-namespace:SymulatorEthernetWPF.Shared"  x:Class="SymulatorEthernetWPF.SimObjects.TimetableItem" 
             mc:Ignorable="d" Height="160" MaxHeight="170" Width="240" Background="White" Loaded="TimetableItem_Loaded">
    <UserControl.Resources>
        <Shared:BooleanNotConverter x:Key="BooleanNotConverter"/>
    </UserControl.Resources>
    <Grid>
        <Label Content="Czas:" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalAlignment="Top"/>
        <UIElements:NumberBox Height="22" Margin="45,14,126,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Right" x:Name="timeInput"/>
        <TextBox x:Name="sourceSelectionTextbox" Margin="45,74,0,0" VerticalAlignment="Top" Height="20" Text="FF:FF:FF:FF:FF:FF" HorizontalAlignment="Left" Width="121"/>
        <TextBox x:Name="destinationSelectionTextbox" Margin="45,101,74,0" VerticalAlignment="Top" Height="20"/>
        <Label Content="Cel" HorizontalAlignment="Left" Margin="0,98,0,0" VerticalAlignment="Top"/>
        <CheckBox Content="Aktywny" HorizontalAlignment="Left" Margin="54,0,0,10" VerticalAlignment="Bottom" IsChecked="True" x:Name="activeCheckbox" Checked="activeCheckbox_Checked" Unchecked="activeCheckbox_Unchecked"/>
        <Button Content="Usuń" Margin="124,0,5,6" VerticalAlignment="Bottom" x:Name="deleteButton" Click="deleteButton_Click"/>
        <Label Content="Żródło" HorizontalAlignment="Left" Margin="0,72,0,0" VerticalAlignment="Top"/>
        <Button Content="Wybierz" Margin="166,74,5,0" VerticalAlignment="Top" Click="Button_Click_1"/>
        <Button Content="Wybierz" Margin="166,101,5,0" VerticalAlignment="Top" Click="Button_Click_2"/>
        <CheckBox Content="Jednorazowy" HorizontalAlignment="Left" Margin="146,18,0,0" VerticalAlignment="Top" IsChecked="True" x:Name="DoOnce"/>
        <Label Content="Powtarzaj co" HorizontalAlignment="Left" Margin="0,41,0,0" VerticalAlignment="Top" IsEnabled="{Binding IsChecked, Converter={StaticResource BooleanNotConverter}, ElementName=DoOnce}"/>
        <UIElements:NumberBox x:Name="RepeatTextBox" HorizontalAlignment="Left" Height="23" Margin="83,42,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="51" IsEnabled="{Binding IsChecked, Converter={StaticResource BooleanNotConverter}, ElementName=DoOnce}"/>
        <Label Content="s" HorizontalAlignment="Left" Margin="139,41,0,0" VerticalAlignment="Top"/>
        <Label Content="s" HorizontalAlignment="Left" Margin="119,10,0,0" VerticalAlignment="Top"/>
        <Rectangle HorizontalAlignment="Stretch" Fill="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" Height="1" Margin="0,0,0,0" VerticalAlignment="Bottom"/>
    </Grid>
</UserControl>
